<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>AniQuest 应用架构图</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        
        body {
            font-family: 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            min-height: 100vh;
            padding: 20px;
        }
        
        .container {
            max-width: 1200px;
            margin: 0 auto;
            background: white;
            border-radius: 15px;
            padding: 30px;
            box-shadow: 0 20px 40px rgba(0,0,0,0.15);
            overflow: hidden;
        }
        
        .header {
            text-align: center;
            margin-bottom: 30px;
        }
        
        .header h1 {
            color: #2c3e50;
            font-size: 28px;
            margin-bottom: 8px;
            background: linear-gradient(45deg, #667eea, #764ba2);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }
        
        .header p {
            color: #7f8c8d;
            font-size: 14px;
        }
        
        .architecture-container {
            position: relative;
            width: 100%;
            height: 600px;
            margin: 20px 0;
            overflow: visible;
        }
        
        .layer {
            position: absolute;
            width: calc(100% - 200px);
            height: 100px;
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: space-around;
            box-shadow: 0 6px 20px rgba(0,0,0,0.1);
            transition: all 0.3s ease;
            padding: 15px;
            left: 100px;
        }
        
        .layer:hover {
            transform: translateY(-8px);
            box-shadow: 0 15px 35px rgba(0,0,0,0.2);
        }
        
        .presentation-layer {
            top: 0;
            background: linear-gradient(135deg, #ff6b6b, #ee5a24);
            color: white;
        }
        
        .provider-layer {
            top: 120px;
            background: linear-gradient(135deg, #4ecdc4, #44bd87);
            color: white;
        }
        
        .repository-layer {
            top: 240px;
            background: linear-gradient(135deg, #45b7d1, #4834d4);
            color: white;
        }
        
        .service-layer {
            top: 360px;
            background: linear-gradient(135deg, #f093fb, #f5576c);
            color: white;
        }
        
        .data-layer {
            top: 480px;
            background: linear-gradient(135deg, #4facfe, #00f2fe);
            color: white;
        }
        
        .layer-label {
            position: absolute;
            left: -80px;
            top: 50%;
            transform: translateY(-50%);
            writing-mode: vertical-rl;
            font-size: 18px;
            font-weight: bold;
            background: rgba(255,255,255,0.95);
            color: #2c3e50;
            padding: 15px 12px;
            border-radius: 25px;
            box-shadow: 0 4px 15px rgba(0,0,0,0.1);
            min-height: 100px;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        .module {
            background: rgba(255,255,255,0.25);
            padding: 10px 15px;
            border-radius: 10px;
            border: 2px solid rgba(255,255,255,0.3);
            font-weight: 600;
            text-align: center;
            min-width: 110px;
            cursor: pointer;
            transition: all 0.3s ease;
            backdrop-filter: blur(10px);
            position: relative;
            overflow: hidden;
            font-size: 13px;
        }
        
        .module::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
            transition: left 0.5s ease;
        }
        
        .module:hover {
            background: rgba(255,255,255,0.4);
            transform: scale(1.05);
            border-color: rgba(255,255,255,0.6);
        }
        
        .module:hover::before {
            left: 100%;
        }
        
        .data-flow {
            position: absolute;
            right: -150px;
            top: 0;
            width: 140px;
            height: 100%;
            background: linear-gradient(180deg, 
                #ff6b6b 0%, #ff6b6b 20%, 
                #4ecdc4 20%, #4ecdc4 40%, 
                #45b7d1 40%, #45b7d1 60%, 
                #f093fb 60%, #f093fb 80%, 
                #4facfe 80%, #4facfe 100%);
            border-radius: 15px;
            display: flex;
            flex-direction: column;
            justify-content: space-around;
            align-items: center;
            color: white;
            font-weight: 600;
            box-shadow: 0 8px 25px rgba(0,0,0,0.1);
            padding: 20px 10px;
        }
        
        .flow-item {
            background: rgba(255,255,255,0.25);
            padding: 12px 8px;
            border-radius: 8px;
            text-align: center;
            width: 100%;
            border: 1px solid rgba(255,255,255,0.3);
            font-size: 12px;
            backdrop-filter: blur(5px);
        }
        
        .connection-arrow {
            position: absolute;
            left: 50%;
            transform: translateX(-50%);
            width: 3px;
            background: linear-gradient(180deg, #34495e, #2c3e50);
            z-index: 10;
            border-radius: 2px;
        }
        
        .connection-arrow::after {
            content: '';
            position: absolute;
            bottom: -10px;
            left: 50%;
            transform: translateX(-50%);
            width: 0;
            height: 0;
            border-left: 8px solid transparent;
            border-right: 8px solid transparent;
            border-top: 15px solid #2c3e50;
        }
        
        .info-panel {
            margin-top: 30px;
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 20px;
        }
        
        .legend {
            padding: 25px;
            background: linear-gradient(135deg, #f8f9fa, #e9ecef);
            border-radius: 15px;
            border-left: 6px solid #667eea;
        }
        
        .legend h3 {
            color: #2c3e50;
            margin-bottom: 20px;
            font-size: 20px;
        }
        
        .legend-item {
            display: flex;
            align-items: center;
            margin-bottom: 15px;
            padding: 10px;
            background: white;
            border-radius: 10px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.05);
        }
        
        .legend-color {
            width: 40px;
            height: 25px;
            border-radius: 6px;
            margin-right: 15px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        }
        
        .features {
            padding: 25px;
            background: linear-gradient(135deg, #e8f5e8, #f0f8f0);
            border-radius: 15px;
            border-left: 6px solid #44bd87;
        }
        
        .features h3 {
            color: #2c3e50;
            margin-bottom: 20px;
            font-size: 20px;
        }
        
        .feature-list {
            display: grid;
            gap: 10px;
        }
        
        .feature-item {
            background: white;
            padding: 15px;
            border-radius: 10px;
            border-left: 4px solid #44bd87;
            box-shadow: 0 2px 8px rgba(0,0,0,0.05);
            transition: transform 0.3s ease;
        }
        
        .feature-item:hover {
            transform: translateX(5px);
        }
        
        .feature-item h4 {
            color: #2c3e50;
            margin: 0 0 8px 0;
            font-size: 16px;
        }
        
        .feature-item p {
            color: #7f8c8d;
            margin: 0;
            font-size: 14px;
            line-height: 1.5;
        }
        
        .modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0,0,0,0.7);
            z-index: 1000;
            backdrop-filter: blur(5px);
        }
        
        .modal-content {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            background: white;
            padding: 40px;
            border-radius: 20px;
            max-width: 600px;
            width: 90%;
            max-height: 80vh;
            overflow-y: auto;
            box-shadow: 0 25px 50px rgba(0,0,0,0.3);
        }
        
        .modal-header {
            border-bottom: 2px solid #ecf0f1;
            padding-bottom: 20px;
            margin-bottom: 25px;
        }
        
        .modal-title {
            color: #2c3e50;
            font-size: 24px;
            margin-bottom: 10px;
        }
        
        .modal-description {
            color: #7f8c8d;
            line-height: 1.6;
        }
        
        .modal-features {
            margin-top: 25px;
        }
        
        .modal-features h4 {
            color: #34495e;
            margin-bottom: 15px;
            font-size: 16px;
        }
        
        .modal-features ul {
            list-style: none;
            padding: 0;
        }
        
        .modal-features li {
            padding: 8px 0;
            color: #7f8c8d;
            border-bottom: 1px solid #ecf0f1;
            position: relative;
            padding-left: 25px;
        }
        
        .modal-features li::before {
            content: '✓';
            position: absolute;
            left: 0;
            color: #44bd87;
            font-weight: bold;
        }
        
        .close-btn {
            background: linear-gradient(135deg, #667eea, #764ba2);
            color: white;
            border: none;
            padding: 12px 25px;
            border-radius: 25px;
            cursor: pointer;
            font-size: 14px;
            font-weight: 600;
            margin-top: 25px;
            transition: transform 0.3s ease;
        }
        
        .close-btn:hover {
            transform: translateY(-2px);
        }
        
        @media (max-width: 1200px) {
            .layer-label {
                display: none;
            }
            .data-flow {
                display: none;
            }
            .layer {
                left: 0;
                width: 100%;
            }
            .info-panel {
                grid-template-columns: 1fr;
            }
        }
        
                     @media (max-width: 768px) {
                 .container {
                     padding: 15px;
                 }
                 .architecture-container {
                     height: 500px;
                 }
                 .layer {
                     height: 80px;
                     padding: 10px;
                 }
                 .provider-layer { top: 90px; }
                 .repository-layer { top: 180px; }
                 .service-layer { top: 270px; }
                 .data-layer { top: 360px; }
                 .module {
                     padding: 8px 12px;
                     font-size: 11px;
                     min-width: 80px;
                 }
                 .connection-arrow {
                     height: 15px;
                 }
             }
        
        .fade-in {
            opacity: 0;
            transform: translateY(30px);
            animation: fadeInUp 0.8s ease forwards;
        }
        
        @keyframes fadeInUp {
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
    </style>
</head>
<body>
    <div class="container">
        <div class="header fade-in">
            <h1>🎌 AniQuest 应用架构图</h1>
            <p>展示各功能模块的组成结构、调用关系和数据流向</p>
        </div>
        
        <div class="architecture-container fade-in">
            <!-- 表现层 (UI Layer) -->
            <div class="layer presentation-layer">
                <div class="layer-label">表现层 UI</div>
                <div class="module" onclick="showModuleInfo('home')">🏠 首页</div>
                <div class="module" onclick="showModuleInfo('search')">🔍 搜索页</div>
                <div class="module" onclick="showModuleInfo('favorites')">❤️ 收藏页</div>
                <div class="module" onclick="showModuleInfo('details')">📱 详情页</div>
                <div class="module" onclick="showModuleInfo('rankings')">📊 排行榜</div>
                <div class="module" onclick="showModuleInfo('settings')">⚙️ 设置页</div>
            </div>
            
            <!-- 状态管理层 (Provider Layer) -->
            <div class="layer provider-layer">
                <div class="layer-label">状态管理</div>
                <div class="module" onclick="showModuleInfo('animeProvider')">📡 AnimeProvider</div>
                <div class="module" onclick="showModuleInfo('favoriteProvider')">💖 FavoriteProvider</div>
                <div class="module" onclick="showModuleInfo('themeProvider')">🎨 ThemeProvider</div>
                <div class="module" onclick="showModuleInfo('contentFilterProvider')">🛡️ ContentFilterProvider</div>
            </div>
            
            <!-- 数据仓库层 (Repository Layer) -->
            <div class="layer repository-layer">
                <div class="layer-label">数据仓库</div>
                <div class="module" onclick="showModuleInfo('animeRepo')">📚 AnimeRepository</div>
                <div class="module" onclick="showModuleInfo('favoriteRepo')">💾 FavoriteRepository</div>
                <div class="module" onclick="showModuleInfo('settingsRepo')">⚙️ SettingsRepository</div>
            </div>
            
            <!-- 服务层 (Service Layer) -->
            <div class="layer service-layer">
                <div class="layer-label">服务层</div>
                <div class="module" onclick="showModuleInfo('apiService')">🌐 ApiService</div>
                <div class="module" onclick="showModuleInfo('storageService')">💿 StorageService</div>
                <div class="module" onclick="showModuleInfo('contentFilterService')">🔒 ContentFilter</div>
                <div class="module" onclick="showModuleInfo('rateLimiter')">⏱️ RateLimiter</div>
            </div>
            
            <!-- 数据层 (Data Layer) -->
            <div class="layer data-layer">
                <div class="layer-label">数据层</div>
                <div class="module" onclick="showModuleInfo('jikanApi')">🔗 Jikan API</div>
                <div class="module" onclick="showModuleInfo('hiveDb')">📦 Hive Database</div>
                <div class="module" onclick="showModuleInfo('sharedPrefs')">🗃️ SharedPreferences</div>
            </div>
            
            <!-- 数据流向指示 -->
            <div class="data-flow">
                <div class="flow-item">用户交互</div>
                <div class="flow-item">状态更新</div>
                <div class="flow-item">数据请求</div>
                <div class="flow-item">网络调用</div>
                <div class="flow-item">数据存储</div>
            </div>
            
            <!-- 连接箭头 -->
            <div class="connection-arrow" style="top: 100px; height: 20px;"></div>
            <div class="connection-arrow" style="top: 220px; height: 20px;"></div>
            <div class="connection-arrow" style="top: 340px; height: 20px;"></div>
            <div class="connection-arrow" style="top: 460px; height: 20px;"></div>
        </div>
        
        <div class="info-panel fade-in">
            <div class="legend">
                <h3>🎨 架构层级说明</h3>
                <div class="legend-item">
                    <div class="legend-color" style="background: linear-gradient(135deg, #ff6b6b, #ee5a24);"></div>
                    <div>
                        <strong>表现层 (UI)</strong><br>
                        用户界面组件，负责展示数据和处理用户交互
                    </div>
                </div>
                <div class="legend-item">
                    <div class="legend-color" style="background: linear-gradient(135deg, #4ecdc4, #44bd87);"></div>
                    <div>
                        <strong>状态管理层</strong><br>
                        使用Provider管理应用状态，实现响应式更新
                    </div>
                </div>
                <div class="legend-item">
                    <div class="legend-color" style="background: linear-gradient(135deg, #45b7d1, #4834d4);"></div>
                    <div>
                        <strong>数据仓库层</strong><br>
                        数据访问抽象层，统一管理数据来源
                    </div>
                </div>
                <div class="legend-item">
                    <div class="legend-color" style="background: linear-gradient(135deg, #f093fb, #f5576c);"></div>
                    <div>
                        <strong>服务层</strong><br>
                        具体的服务实现，包括网络请求和数据处理
                    </div>
                </div>
                <div class="legend-item">
                    <div class="legend-color" style="background: linear-gradient(135deg, #4facfe, #00f2fe);"></div>
                    <div>
                        <strong>数据层</strong><br>
                        外部API和本地存储，提供原始数据
                    </div>
                </div>
            </div>
            
            <div class="features">
                <h3>🚀 核心功能特性</h3>
                <div class="feature-list">
                    <div class="feature-item">
                        <h4>🏠 首页展示</h4>
                        <p>展示热门动漫、最新番剧、推荐内容等，支持内容过滤</p>
                    </div>
                    <div class="feature-item">
                        <h4>🔍 智能搜索</h4>
                        <p>支持关键词搜索，按类型、评分、年份等条件筛选</p>
                    </div>
                    <div class="feature-item">
                        <h4>❤️ 收藏管理</h4>
                        <p>本地收藏功能，支持添加、删除、查看收藏列表</p>
                    </div>
                    <div class="feature-item">
                        <h4>📊 排行榜</h4>
                        <p>显示各类动漫排行榜，包括评分排行、人气排行等</p>
                    </div>
                    <div class="feature-item">
                        <h4>🛡️ 内容过滤</h4>
                        <p>三级内容过滤系统，确保家庭友好的观看体验</p>
                    </div>
                    <div class="feature-item">
                        <h4>💾 数据持久化</h4>
                        <p>使用Hive和SharedPreferences实现本地数据存储</p>
                    </div>
                </div>
            </div>
        </div>
        
        <!-- 模块详情弹窗 -->
        <div id="moduleModal" class="modal">
            <div class="modal-content">
                <div class="modal-header">
                    <div id="modalTitle" class="modal-title"></div>
                    <div id="modalDescription" class="modal-description"></div>
                </div>
                <div class="modal-features">
                    <h4>主要功能：</h4>
                    <ul id="modalFeatures"></ul>
                </div>
                <button class="close-btn" onclick="closeModal()">关闭</button>
            </div>
        </div>
    </div>

    <script>
        const moduleInfo = {
            home: {
                title: '🏠 首页模块',
                description: '应用主页面，作为用户的入口点，展示各类动漫内容和快速导航功能。整合了多个数据源，为用户提供个性化的内容推荐。',
                features: ['热门动漫轮播展示', '最新番剧列表', '个性化推荐内容', '快速导航菜单', '实时内容过滤应用', '分类浏览入口']
            },
            search: {
                title: '🔍 搜索模块',
                description: '提供强大且灵活的动漫搜索功能，支持多种搜索条件和高级筛选选项，帮助用户快速找到目标内容。',
                features: ['关键词模糊搜索', '高级筛选条件', '搜索历史记录', '结果智能排序', '类型和标签过滤', '实时搜索建议']
            },
            favorites: {
                title: '❤️ 收藏模块',
                description: '用户个人收藏管理中心，提供完整的收藏功能，支持本地存储和快速访问，提升用户体验。',
                features: ['收藏列表管理', '快速添加/删除操作', '收藏分类整理', '离线数据访问', '收藏状态同步', '批量操作支持']
            },
            details: {
                title: '📱 详情模块',
                description: '动漫详细信息展示页面，提供全面的动漫信息，包括基本信息、剧情介绍、评分系统等。',
                features: ['动漫基本信息展示', '详细剧情简介', '用户评分系统', '相关动漫推荐', '高清截图预览', '分享功能']
            },
            rankings: {
                title: '📊 排行榜模块',
                description: '展示各类动漫排行榜信息，帮助用户发现热门和高评分的动漫作品，支持多种排序方式。',
                features: ['评分排行榜', '人气排行榜', '最新更新排行', '分类排行展示', '实时数据更新', '排行趋势分析']
            },
            settings: {
                title: '⚙️ 设置模块',
                description: '应用个性化设置中心，提供丰富的自定义选项，让用户根据个人喜好调整应用行为和外观。',
                features: ['主题样式切换', '内容过滤等级设置', '语言偏好选择', '缓存管理工具', '应用关于信息', '用户偏好保存']
            },
            animeProvider: {
                title: '📡 AnimeProvider',
                description: '动漫数据的核心状态管理器，负责管理所有与动漫相关的数据状态，实现高效的状态更新和响应式UI。',
                features: ['动漫数据获取管理', '状态变化通知', '错误状态处理', '加载状态管理', '数据缓存策略', '状态持久化']
            },
            favoriteProvider: {
                title: '💖 FavoriteProvider',
                description: '收藏功能的状态管理器，处理用户收藏相关的所有状态变化，确保收藏数据的一致性和可靠性。',
                features: ['收藏状态管理', '收藏列表维护', '本地数据同步', '收藏状态监听', '操作反馈处理', '批量操作支持']
            },
            themeProvider: {
                title: '🎨 ThemeProvider',
                description: '主题和外观设置的状态管理器，负责管理应用的视觉主题，支持动态主题切换和用户偏好保存。',
                features: ['主题动态切换', '颜色方案配置', '用户偏好管理', '主题设置持久化', '样式实时更新', '夜间模式支持']
            },
            contentFilterProvider: {
                title: '🛡️ ContentFilterProvider',
                description: '内容过滤系统的状态管理器，实现智能内容过滤，为用户提供安全、适宜的内容浏览体验。',
                features: ['过滤等级管理', '过滤规则配置', '实时内容过滤', '过滤设置保存', '家长控制功能', '内容安全检查']
            },
            animeRepo: {
                title: '📚 AnimeRepository',
                description: '动漫数据仓库，作为数据访问的抽象层，统一管理来自不同数据源的动漫信息，提供一致的数据接口。',
                features: ['数据源抽象管理', 'API调用封装', '智能缓存策略', '错误处理机制', '数据格式转换', '离线数据支持']
            },
            favoriteRepo: {
                title: '💾 FavoriteRepository',
                description: '收藏数据仓库，专门负责处理收藏相关的数据操作，包括本地存储、数据查询和同步等功能。',
                features: ['本地数据存储', '收藏数据查询', 'CRUD操作支持', '数据同步机制', '备份恢复功能', '数据完整性保证']
            },
            settingsRepo: {
                title: '⚙️ SettingsRepository',
                description: '设置数据仓库，管理应用的各种配置信息和用户偏好设置，确保设置的持久化和版本兼容性。',
                features: ['配置信息管理', '用户偏好存储', '默认值处理', '版本兼容性支持', '设置迁移功能', '配置验证机制']
            },
            apiService: {
                title: '🌐 ApiService',
                description: '网络请求服务，封装所有的HTTP请求操作，提供统一的网络访问接口，处理请求拦截和响应处理。',
                features: ['HTTP请求封装', 'RESTful API支持', '请求拦截处理', '响应数据处理', '网络错误重试', '请求缓存机制']
            },
            storageService: {
                title: '💿 StorageService',
                description: '本地存储服务，提供高效的本地数据存储解决方案，支持多种数据类型的存储和管理。',
                features: ['Hive数据库操作', '数据加密存储', '批量数据操作', '存储性能优化', '数据迁移支持', '存储空间管理']
            },
            contentFilterService: {
                title: '🔒 ContentFilter',
                description: '内容过滤工具，实现智能的内容检测和过滤功能，支持多级过滤策略，确保内容的适宜性。',
                features: ['内容智能检测', '多级过滤策略', '关键词过滤', '年龄分级检查', '内容安全评估', '过滤规则自定义']
            },
            rateLimiter: {
                title: '⏱️ RateLimiter',
                description: '请求频率限制器，控制API请求的频率，防止请求过于频繁，保护API资源并提升应用稳定性。',
                features: ['请求频率控制', 'API配额管理', '请求队列管理', '限流策略配置', '请求优先级处理', '性能监控']
            },
            jikanApi: {
                title: '🔗 Jikan API',
                description: '外部动漫数据API接口，基于MyAnimeList的非官方API，提供丰富的动漫数据和信息。',
                features: ['RESTful接口访问', '丰富的动漫数据', '搜索功能支持', '排行榜数据', '详细信息获取', '实时数据更新']
            },
            hiveDb: {
                title: '📦 Hive Database',
                description: '轻量级NoSQL本地数据库，专为Flutter应用优化，提供快速的数据读写和类型安全的数据存储。',
                features: ['NoSQL数据存储', '高速数据读写', '类型安全保证', '跨平台兼容', '数据持久化', '内存优化']
            },
            sharedPrefs: {
                title: '🗃️ SharedPreferences',
                description: '应用偏好设置存储，用于保存简单的键值对数据，如用户设置、应用配置等轻量级数据。',
                features: ['键值对存储', '简单配置管理', '平台原生实现', '自动数据同步', '轻量级存储', '快速访问']
            }
        };

        function showModuleInfo(moduleKey) {
            const info = moduleInfo[moduleKey];
            if (!info) return;
            
            document.getElementById('modalTitle').textContent = info.title;
            document.getElementById('modalDescription').textContent = info.description;
            
            const featuresList = document.getElementById('modalFeatures');
            featuresList.innerHTML = '';
            info.features.forEach(feature => {
                const li = document.createElement('li');
                li.textContent = feature;
                featuresList.appendChild(li);
            });
            
            document.getElementById('moduleModal').style.display = 'block';
            document.body.style.overflow = 'hidden';
        }

        function closeModal() {
            document.getElementById('moduleModal').style.display = 'none';
            document.body.style.overflow = 'auto';
        }

        // 点击模态框背景关闭
        document.getElementById('moduleModal').addEventListener('click', function(e) {
            if (e.target === this) {
                closeModal();
            }
        });

        // ESC键关闭模态框
        document.addEventListener('keydown', function(e) {
            if (e.key === 'Escape') {
                closeModal();
            }
        });

        // 页面加载动画
        window.addEventListener('load', function() {
            const layers = document.querySelectorAll('.layer');
            layers.forEach((layer, index) => {
                layer.style.opacity = '0';
                layer.style.transform = 'translateX(-50px)';
                setTimeout(() => {
                    layer.style.transition = 'all 0.8s ease';
                    layer.style.opacity = '1';
                    layer.style.transform = 'translateX(0)';
                }, index * 150);
            });
            
            // 添加淡入动画
            const fadeElements = document.querySelectorAll('.fade-in');
            fadeElements.forEach((element, index) => {
                element.style.animationDelay = `${index * 0.3}s`;
            });
        });

        // 鼠标悬停效果
        document.querySelectorAll('.module').forEach(module => {
            module.addEventListener('mouseenter', function() {
                this.style.transform = 'scale(1.05) translateY(-3px)';
            });
            
            module.addEventListener('mouseleave', function() {
                this.style.transform = 'scale(1) translateY(0)';
            });
        });
    </script>
</body>
</html> 